
package com.nhim.cms.admin.client.rpc;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.nhim.cms.admin.shared.TemplateRPCProxy;
import com.nhim.cms.admin.shared.TemplateResourceProxy;

/**
 * @author hlieuta
 *
 */
@RemoteServiceRelativePath("templateRPCService")
public interface TemplateRPCService extends RemoteService {
	
	String persitTemplate(TemplateRPCProxy template) throws IllegalArgumentException;
	List<TemplateRPCProxy> findAllGroupTemplate() throws IllegalArgumentException;
	List<TemplateRPCProxy> findAllSiteTemplate() throws IllegalArgumentException;
	List<TemplateRPCProxy> findAllContentTemplateTemplate(Integer contentId) throws IllegalArgumentException;
	Boolean remove(Integer Id) throws IllegalArgumentException; 
	List<TemplateResourceProxy> findAllResources(Integer templateId) throws IllegalArgumentException;
	Boolean removeResource(Integer Id,String fileName) throws IllegalArgumentException;
	List<TemplateResourceProxy> findEditableResoures(Integer templateId) throws IllegalArgumentException;
	String retrieveContent(Integer templateId,String filename) throws IllegalArgumentException;
	Boolean saveFile(Integer templateId,String content,String fileName) throws IllegalArgumentException;

}
